********************************************************************************
** 	TITLE:		us2000_anes_integrity                       			      ** 	
**	AUTHOR:	    Review version                                                **
**	DATA:       anes2000TS                                                    **
**	DATE:		December 2022	  				                              **	
**	VERSION:	Stata 16					                                  **	
********************************************************************************

* Version control

version 16.0

* Run poll file

do us2000_polls

* Open log file

capture log close       			  			              
log using "us2000_anes_integrity", replace

* Open the dataset

use "anes2000TS.dta", clear

* Election ID

gen election = "us2000-anes"


*********************************
** SATISFACTION WITH DEMOCRACY **
*********************************

* Satisfaction with democracy (post)

gen swd_post = V001651

recode swd_post 0=. 8=. 9=.

replace swd_post = 5 - swd_post

label define swd 1 "Not at all satisfied" 2 "Not very satisfied" 3 "Fairly satisfied" 4 "Satisfied"
label values swd_post swd


***********************
** ELECTION FAIRNESS **
***********************

gen integrity_5pts = V001291

recode integrity_5pts  0=. 8=. 9=.

replace integrity_5pts = 6 - integrity_5pts

gen integrity_4pts = integrity_5pts

recode integrity_4pts 2=1 3=2 4=3 5=4


***************************
** INDEPENDENT VARIABLES **
***************************

* Time

gen sdate = "2000" + V000008

gen surveydate = date(sdate,"YMD")

format %tdMon_DD,_CCYY surveydate

gen edate = 20001107

gen electiondate=date(string(edate,"%8.0f"),"YMD")

format %tdMon_DD,_CCYY electiondate

gen time = (electiondate - surveydate) - 1 // Substract 1 to correct for election date

* Post-election date

gen pmonthday = V000130

replace pmonthday = "" if pmonthday == "0000"

gen pdate =  "2000" + pmonthday

gen podate = date(pdate,"YMD")

format %tdMon_DD,_CCYY podate

* Gender

gen male = V001029

recode male 2=0

* Age

gen age = V000908

recode age 0=. 

replace age = . if age < 18

* Education

gen education = V000913

recode education 9=. 

* Postsecondary

gen postsecondary = 0 if education < 5
replace postsecondary = 1 if education >= 5

* Region

gen state = V000080

gen region = .

replace region = 1 if state == 09
replace region = 1 if state == 23
replace region = 1 if state == 25
replace region = 1 if state == 33
replace region = 1 if state == 44
replace region = 1 if state == 50
replace region = 1 if state == 34
replace region = 1 if state == 36
replace region = 1 if state == 42
replace region = 2 if state == 17
replace region = 2 if state == 18
replace region = 2 if state == 26
replace region = 2 if state == 39
replace region = 2 if state == 55
replace region = 2 if state == 19
replace region = 2 if state == 20
replace region = 2 if state == 27
replace region = 2 if state == 29
replace region = 2 if state == 31
replace region = 2 if state == 38
replace region = 2 if state == 46
replace region = 3 if state == 10
replace region = 3 if state == 11
replace region = 3 if state == 12
replace region = 3 if state == 13
replace region = 3 if state == 24
replace region = 3 if state == 37
replace region = 3 if state == 45
replace region = 3 if state == 51
replace region = 3 if state == 54
replace region = 3 if state == 01
replace region = 3 if state == 21
replace region = 3 if state == 28
replace region = 3 if state == 47
replace region = 3 if state == 05
replace region = 3 if state == 22
replace region = 3 if state == 40
replace region = 3 if state == 48
replace region = 4 if state == 04
replace region = 4 if state == 08
replace region = 4 if state == 16
replace region = 4 if state == 30
replace region = 4 if state == 32
replace region = 4 if state == 35
replace region = 4 if state == 49
replace region = 4 if state == 56
replace region = 4 if state == 02
replace region = 4 if state == 06
replace region = 4 if state == 15
replace region = 4 if state == 41
replace region = 4 if state == 53

label define region 1 "Northeast" 2 "Midwest" 3 "South" 4 "West"
label values region region

* Race

gen white = max(V000066,V001030)

recode white 0=. 8=. 9=.

replace white = 0 if white!=1 & white!=. 

* Income

gen income = V000994

recode income 0=. 98=. 99=.

* Above average income

egen income_mean = mean(income)
egen income_sd = sd(income)
gen income_std = (income - income_mean)/income_sd
gen income_above = 0 if income_std < 0
replace income_above = 1 if income_std > 0

* Caring about outcome

gen care_whole = V000302

recode care_whole 8=. 3=0

* Closeness of election

gen closeness_whole = max(V000486,V000487)

recode closeness_whole 0=. 8=. 1=0 5=1

* Party identification

gen pid = V001409

recode pid 0=. 3=2 5=0 7=0 8=. 9=. 

label define pid 0 "Independent/Other" 1 "Democrat" 2 "Republican"
label values pid pid

* Party identification status

gen pidstatus_whole = pid

recode pidstatus_whole 0=2 2=3

label define pidstatus 1 "Loser PID" 2 "Independent/Other" 3 "Winner PID"
label values pidstatus_whole pidstatus

* Party identification scale

gen pidscale = V000523

recode pidscale 7=. // Other minor party (only one respondent) recoded as missing data
recode pidscale 8=3 // Apolitical recoded as Independent
recode pidscale 9=. // NA recoded as missing data

replace pidscale = pidscale + 1

gen pidscale_whole = pidscale

label define pidscale 1 "Strong loser PID" 2 "Weak loser PID" 3 "Leaner loser PID" 4 "No PID" 5 "Leaner winner PID" 6 "Weak winner PID" 7 "Strong winner PID"
label values pidscale_whole pidscale

* Actual vote

gen voteact = V001249

recode voteact 2=7 3=2 4=7 5=3 6=4 8=. 9=.

label define voteact 0 "Not voted" 1 "Al Gore" 2 "George W. Bush" 3 "Pat Buchanan" 4 "Ralph Nader" 7 "Other"
label values voteact voteact

* Actual vote status

gen voteactstatus_whole = .

replace voteactstatus_whole = 3 if voteact == 2

replace voteactstatus_whole = 2 if voteact == 0

replace voteactstatus_whole = 1 if voteact!=2 & voteact!=. & voteactstatus_whole!=2
 
label values voteactstatus_whole votestatus

* Democratic candidate rating

gen demrating = V000360

recode demrating 997=. 998=. 999=.

* Republican candidate rating

gen reprating = V000361

recode reprating 997=. 998=. 999=.

* Candidate preference

gen preference = 2 if reprating > demrating
replace preference = 1 if demrating > reprating

* Candidate preference status

gen prefstatus_whole = .

replace prefstatus_whole = 1 if reprating > demrating
replace prefstatus_whole = . if demrating == reprating
replace prefstatus_whole = 0 if demrating > reprating

label define prefstatus 0 "Loser preference" 1 "Winner preference"
label values prefstatus_whole prefstatus

* Tony Blair - Correct answer (British Prime Minister) = 1, Incorrect answer = 0

gen blair = V001453

recode blair 0=. 9=. 5=0 8=0

* Trent Lott - Correct answer (Mississippi senator) = 1, Incorrect answer = 0

gen lott = V001447

recode lott 0=. 9=. 5=0 8=0

* William Rehnquist - Correct answer (Supreme Court Justice) = 1, Incorrect answer = 0

gen rehnquist = V001450

recode rehnquist 0=. 9=. 5=0 8=0

* Janet Reno - Correct answer (Attorney General) = 1, Incorrect answer = 0

gen reno = V001456

recode reno 0=. 9=. 5=0 8=0

* Party with the most members in the U.S. House of Representatives before election - Correct answer (Republican) = 1, Incorrect answer = 0

gen house = V001356

recode house 0=. 1=0 5=1 8=0

* Party with the most members in the U.S. Senate before election - Correct answer (Republican) = 1, Incorrect answer = 0

gen senate = V001357

recode senate 0=. 1=0 5=1 8=0

* U.S. state George W. Bush lives in now - Correct answer (Texas) = 1, Incorrect answer = 0

gen bushstate = V001458

recode bushstate 0=. 9=. 

replace bushstate = 0 if bushstate!=3 & bushstate!=. 
replace bushstate = 1 if bushstate == 3

* George W. Bush religion - Correct answer (Methodist) = 1, Incorrect answer = 0

gen bushreligion = V001460

recode bushreligion 9=. 

replace bushreligion = 0 if bushreligion!=2 & bushreligion!=. 
replace bushreligion = 1 if bushreligion == 2

* U.S. state Al Gore is from originally - Correct answer (Tennessee) = 1, Incorrect answer = 0

gen gorestate = V001462

recode gorestate 0=. 9=. 

replace gorestate = 0 if gorestate!=2 & gorestate!=. 
replace gorestate = 1 if gorestate == 2

* Al Gore religion - Correct answer (Baptist) = 1, Incorrect answer = 0

gen gorereligion = V001464

recode gorereligion 9=. 

replace gorereligion = 0 if gorereligion!=1 & gorereligion!=. 
replace gorereligion = 1 if gorereligion == 1

* U.S. state Dick Cheney lives in now - Correct answer (Wyoming) = 1, Incorrect answer = 0

gen cheneystate = V001466

recode cheneystate 0=. 9=. 

replace cheneystate = 0 if cheneystate!=4 & cheneystate!=. 
replace cheneystate = 1 if cheneystate == 4

* Dick Cheney religion - Correct answer (Methodist) = 1, Incorrect answer = 0

gen cheneyreligion = V001468

recode cheneyreligion 9=. 

replace cheneyreligion = 0 if cheneyreligion!=2 & cheneyreligion!=. 
replace cheneyreligion = 1 if cheneyreligion == 2

* U.S. state Joseph Lieberman lives in now - Correct answer (Connecticut) = 1, Incorrect answer = 0

gen liebermanstate = V001470

recode liebermanstate 0=. 9=. 

replace liebermanstate = 0 if liebermanstate!=1 & liebermanstate!=. 
replace liebermanstate = 1 if liebermanstate == 1

* Joseph Lieberman religion - Correct answer (Jewish) = 1, Incorrect answer = 0

gen liebermanreligion = V001472

recode liebermanreligion 9=. 

replace liebermanreligion = 0 if liebermanreligion!=3 & liebermanreligion!=. 
replace liebermanreligion = 1 if liebermanreligion == 3

* Political knowledge index

gen knowledge = blair + lott + rehnquist + reno + house + senate + bushstate + bushreligion + gorestate + gorereligion + cheneystate + cheneyreligion + liebermanstate + liebermanreligion

sum knowledge

gen knowledge_n = (knowledge - `r(min)') / (`r(max)'-`r(min)')

* Above average knowledge

egen knowledge_mean = mean(knowledge)
egen knowledge_sd = sd(knowledge)
gen knowledge_std = (knowledge - knowledge_mean)/knowledge_sd
gen knowledge_above = 0 if knowledge_std < 0
replace knowledge_above = 1 if knowledge_std > 0

* Economy (sociotropic)

gen econ_soc_ret = V000491 // Retrospective

recode econ_soc_ret 8=. 9=. 

replace econ_soc_ret = 6 - econ_soc_ret

gen econ_soc_pro = V000499 // Prospective

recode econ_soc_pro 8=. 9=. 

replace econ_soc_pro = 6 - econ_soc_pro

* Economy (egotropic)

gen econ_ego_ret = V000401 // Retrospective

recode econ_ego_ret 0=. 8=. 9=. 

replace econ_ego_ret = 6 - econ_ego_ret

gen econ_ego_pro = V000406 // Prospective

recode econ_ego_pro 0=. 8=. 9=. 

replace econ_ego_pro = 6 - econ_ego_pro

* Economy index (sociotropic)
 
gen economy_soc = econ_soc_ret + econ_soc_pro

sum economy_soc

replace economy_soc = (economy_soc - `r(min)') / (`r(max)'-`r(min)')

* Economy index (egotropic)
 
gen economy_ego = econ_ego_ret + econ_ego_pro

sum economy_ego

replace economy_ego = (economy_ego - `r(min)') / (`r(max)'-`r(min)')

* Public officials don't care (post)

gen dontcare_post = V001527

recode dontcare_post 0=. 8=. 9=.

replace dontcare_post = 6 - dontcare_post

* Trust government to do right thing (post)

gen govtright_post = V001534

recode govtright_post 0=. 8=. 9=.

* Waste money (post)

gen waste_post = V001535

recode waste_post 1=3 3=2 5=1 0=. 8=. 9=.

* Big interests (post)

gen biginterests_post = V001536

recode biginterests_post 1=2 5=1 0=. 8=. 9=.

* Crooked (post)

gen crooked_post = V001537

recode crooked_post 1=3 3=2 5=1 0=. 8=. 9=.

* Governement attention (post)

gen govtatt_post = V001539

recode govtatt_post 1=3 3=2 5=1 0=. 8=. 9=.

* Political cynicism (post)

gen cynicism_post = dontcare_post + govtright_post + waste_post + biginterests_post + crooked_post + govtatt_post // Political cynicism index

sum cynicism_post

gen cynicism_post_n = (cynicism_post - `r(min)') / (`r(max)'-`r(min)')

* Social mistruct

gen people = V001475

recode people 0=. 1=0 5=1 8=. 9=.

* Survey weight

gen weight = V000002a


******************
** EXPECTATIONS **
******************

* Forecasts (1 = Democrat, 2 = Republican, 3 = Pat Buchanan, 4 = Ralph Nader, 7 = other)

gen forecast_whole = V000485

recode forecast_whole 9=. 

* Identify correct forecasts

gen correct_whole_d = 0 if forecast_whole!=2 & forecast_whole!=. 
replace correct_whole_d = 1 if forecast_whole == 2

* Mean of correct forecasts by day

bysort time : egen correct_mean = mean(correct_whole_d)

* PID matches forecast

gen match = .

replace match = 1 if pid == 1 & forecast_whole == 1
replace match = 1 if pid == 2 & forecast_whole == 2
replace match = 0 if pid == 1 & forecast_whole == 2
replace match = 0 if pid == 2 & forecast_whole == 1

* Consistency (PID)

gen dissonant_p = .

replace dissonant_p = 0 if pid == 1 & forecast_whole == 1
replace dissonant_p = 1 if pid == 1 & forecast_whole == 2
replace dissonant_p = 1 if pid == 1 & forecast_whole == 3
replace dissonant_p = 1 if pid == 1 & forecast_whole == 4
replace dissonant_p = 1 if pid == 1 & forecast_whole == 7

replace dissonant_p = 0 if pid == 2 & forecast_whole == 2
replace dissonant_p = 1 if pid == 2 & forecast_whole == 1
replace dissonant_p = 1 if pid == 2 & forecast_whole == 3
replace dissonant_p = 1 if pid == 2 & forecast_whole == 4
replace dissonant_p = 1 if pid == 2 & forecast_whole == 7

* Consistency (vote)

gen dissonant_v = .

replace dissonant_v = 0 if voteact == 1 & forecast_whole == 1
replace dissonant_v = 1 if voteact == 1 & forecast_whole == 2
replace dissonant_v = 1 if voteact == 1 & forecast_whole == 3
replace dissonant_v = 1 if voteact == 1 & forecast_whole == 4
replace dissonant_v = 1 if voteact == 1 & forecast_whole == 7

replace dissonant_v = 0 if voteact == 2 & forecast_whole == 2
replace dissonant_v = 1 if voteact == 2 & forecast_whole == 1
replace dissonant_v = 1 if voteact == 2 & forecast_whole == 3
replace dissonant_v = 1 if voteact == 2 & forecast_whole == 4
replace dissonant_v = 1 if voteact == 2 & forecast_whole == 7

replace dissonant_v = 0 if voteact == 3 & forecast_whole == 3
replace dissonant_v = 1 if voteact == 3 & forecast_whole == 1
replace dissonant_v = 1 if voteact == 3 & forecast_whole == 2
replace dissonant_v = 1 if voteact == 3 & forecast_whole == 4
replace dissonant_v = 1 if voteact == 3 & forecast_whole == 7

replace dissonant_v = 0 if voteact == 4 & forecast_whole == 4
replace dissonant_v = 1 if voteact == 4 & forecast_whole == 1
replace dissonant_v = 1 if voteact == 4 & forecast_whole == 2
replace dissonant_v = 1 if voteact == 4 & forecast_whole == 3
replace dissonant_v = 1 if voteact == 4 & forecast_whole == 7


******************************
** RESPONDENTS' STATUS: PID **
******************************

* PID (all respondents)

gen unxloser_whole_p = 1 if pid == forecast_whole & pidstatus_whole == 1 & pid!=. // Unexpected losers
gen exploser_whole_p = 1 if pid!=forecast_whole & pidstatus_whole == 1 & pid!=. // Expected losers
gen unxwinner_whole_p = 1 if pid!=forecast_whole & pidstatus_whole == 3 & pid!=. // Unexpected winners
gen expwinner_whole_p = 1 if pid == forecast_whole & pidstatus_whole == 3 & pid!=. // Expected winners

gen nopid = 1 if pid == 0 // No PID

replace unxloser_whole_p = 0 if exploser_whole_p == 1 | unxwinner_whole_p == 1 | expwinner_whole_p == 1 | nopid == 1
replace exploser_whole_p = 0 if unxloser_whole_p == 1 | unxwinner_whole_p == 1 | expwinner_whole_p == 1 | nopid == 1
replace unxwinner_whole_p = 0 if unxloser_whole_p == 1 | exploser_whole_p == 1 | expwinner_whole_p == 1 | nopid == 1
replace expwinner_whole_p = 0 if unxloser_whole_p == 1 | exploser_whole_p == 1 | unxwinner_whole_p == 1 | nopid == 1

replace nopid = 0 if pid!=0 & pid!=. 

gen status_whole_p = .

replace status_whole_p = 1 if unxloser_whole_p == 1
replace status_whole_p = 2 if exploser_whole_p == 1
replace status_whole_p = 3 if nopid == 1
replace status_whole_p = 4 if expwinner_whole_p == 1
replace status_whole_p = 5 if unxwinner_whole_p == 1
replace status_whole_p = . if pid == . | forecast_whole == .

* PID (excluding independents/others)

gen status_whole_p_noind = status_whole_p
replace status_whole_p_noind = . if pid == 0

* Generate binary variable for unexpected outcomes

gen unexpected_p = 0 if status_whole_p == 2 | status_whole_p == 4 | status_whole_p == 3 & correct_whole_d == 1
replace unexpected_p = 1 if status_whole_p == 1 | status_whole_p == 5 | status_whole_p == 3 & correct_whole_d == 0


*******************************
** RESPONDENTS' STATUS: VOTE **
*******************************

* Actual vote

gen unxloser_whole_v = 1 if voteact == forecast_whole & voteactstatus_whole == 1 & voteact!=. // Unexpected losers
gen exploser_whole_v = 1 if voteact!=forecast_whole & voteactstatus_whole == 1 & voteact!=. // Expected losers
gen unxwinner_whole_v = 1 if voteact!=forecast_whole & voteactstatus_whole == 3 & voteact!=. // Unexpected winners
gen expwinner_whole_v = 1 if voteact == forecast_whole & voteactstatus_whole == 3 & voteact!=. // Expected winners

gen novoteact = 1 if voteact == 0 // No vote

replace unxloser_whole_v = 0 if exploser_whole_v == 1 | unxwinner_whole_v == 1 | expwinner_whole_v == 1 | novoteact == 1
replace exploser_whole_v = 0 if unxloser_whole_v == 1 | unxwinner_whole_v == 1 | expwinner_whole_v == 1 | novoteact == 1
replace unxwinner_whole_v = 0 if unxloser_whole_v == 1 | exploser_whole_v == 1 | expwinner_whole_v == 1 | novoteact == 1
replace expwinner_whole_v = 0 if unxloser_whole_v == 1 | exploser_whole_v == 1 | unxwinner_whole_v == 1 | novoteact == 1

replace novoteact = 0 if voteact!=0 & voteact!=. 

gen status_whole_v = .

replace status_whole_v = 1 if unxloser_whole_v == 1
replace status_whole_v = 2 if exploser_whole_v == 1
replace status_whole_v = 3 if novoteact == 1
replace status_whole_v = 4 if expwinner_whole_v == 1
replace status_whole_v = 5 if unxwinner_whole_v == 1
replace status_whole_v = . if voteact == . | forecast_whole == .

* Generate binary variable for unexpected outcomes

gen unexpected_v = 0 if status_whole_v == 2 | status_whole_v == 4 | status_whole_v == 3 & correct_whole_d == 1
replace unexpected_v = 1 if status_whole_v == 1 | status_whole_v == 5 | status_whole_v == 3 & correct_whole_d == 0


*************************************
** RESPONDENTS' STATUS: PREFERENCE **
*************************************

* Candidate preference

gen unxloser_whole_r = 1 if preference == forecast_whole & prefstatus_whole == 0 & preference!=. // Unexpected losers

gen exploser_whole_r = 1 if preference!=forecast_whole & prefstatus_whole == 0 & preference!=. // Expected losers

gen unxwinner_whole_r = 1 if preference!=forecast_whole & prefstatus_whole == 1 & preference!=. // Unexpected winners

gen expwinner_whole_r = 1 if preference == forecast_whole & prefstatus_whole == 1 & preference!=. // Expected winners

replace unxloser_whole_r = 0 if exploser_whole_r == 1 | unxwinner_whole_r == 1 | expwinner_whole_r == 1
replace exploser_whole_r = 0 if unxloser_whole_r == 1 | unxwinner_whole_r == 1 | expwinner_whole_r == 1
replace unxwinner_whole_r = 0 if unxloser_whole_r == 1 | exploser_whole_r == 1 | expwinner_whole_r == 1
replace expwinner_whole_r = 0 if unxloser_whole_r == 1 | exploser_whole_r == 1 | unxwinner_whole_r == 1

gen status_whole_r = .

replace status_whole_r = 1 if unxloser_whole_r == 1
replace status_whole_r = 2 if exploser_whole_r == 1
replace status_whole_r = 3 if expwinner_whole_r == 1
replace status_whole_r = 4 if unxwinner_whole_r == 1
replace status_whole_r = . if voteact == . | forecast_whole == .

* Generate binary variable for unexpected outcomes

gen unexpected_r = 0 if status_whole_r == 2 | status_whole_r == 3
replace unexpected_r = 1 if status_whole_r == 1 | status_whole_r == 4


**************************
** MERGE WITH POLL DATA **
**************************

* Merge

nearmrg using "us2000_polls.dta", lower nearvar(time)
drop _merge

* Congruent polling information

gen congruent = .

replace congruent = 1 if ahead_mean3 == 1 & forecast_whole == 1
replace congruent = 1 if ahead_mean3 == 2 & forecast_whole == 1 & pollmar_mean3 <= 2
replace congruent = 0 if ahead_mean3 == 2 & forecast_whole == 1 & pollmar_mean3 > 2

replace congruent = 1 if ahead_mean3 == 2 & forecast_whole == 2
replace congruent = 1 if ahead_mean3 == 1 & forecast_whole == 2 & pollmar_mean3 <= 2
replace congruent = 0 if ahead_mean3 == 1 & forecast_whole == 2 & pollmar_mean3 > 2


**********************
** SELECT VARIABLES **
**********************

* Keep needed variables

keep election podate integrity_5pts integrity_4pts swd_post match pid pidstatus_whole pidscale_whole voteactstatus_whole prefstatus_whole unexpected_p unexpected_v unexpected_r economy_soc economy_ego cynicism_post_n people knowledge_n knowledge_above male white age income income_above education postsecondary region closeness_whole care_whole correct_whole_d correct_mean time dissonant_p dissonant_v congruent pollmar_mean3 weight 


**********
** SAVE **
**********

save "us2000_anes_integrity.dta", replace


************
** TABLES **
************

* Party identification

eststo: regress integrity_4pts i.pidstatus_whole knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2000_anes_integrity_pid.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_p 1.pidstatus_whole#0.unexpected_p 2.pidstatus_whole#0.unexpected_p 3.pidstatus_whole#0.unexpected_p 1.pidstatus_whole#1.unexpected_p) refcat(1.pidstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_p "\textbf{\textit{Unexpected outcome?}}" 2.pidstatus_whole#1.unexpected_p "\textbf{\textit{2-way interaction}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD" "FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.pidstatus_whole "\hspace{1em} Loser (R)" 2.pidstatus_whole "\hspace{1em} Independent" 3.pidstatus_whole "\hspace{1em} Winner" 1.unexpected_p "\hspace{1em} Yes" 2.pidstatus_whole#1.unexpected_p "\hspace{1em} Independent $\times$ Unexpected" 3.pidstatus_whole#1.unexpected_p "\hspace{1em} Winner $\times$ Unexpected" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" ) order(1.pidstatus_whole 2.pidstatus_whole 3.pidstatus_whole 1.unexpected_p 2.pidstatus_whole#1.unexpected_p 3.pidstatus_whole#1.unexpected_p economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2000 U.S. Presidential Election")

eststo clear

* Reported vote

eststo: regress integrity_4pts i.voteactstatus_whole knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2000_anes_integrity_vote.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_v 1.voteactstatus_whole#0.unexpected_v 2.voteactstatus_whole#0.unexpected_v 3.voteactstatus_whole#0.unexpected_v 1.voteactstatus_whole#1.unexpected_v) refcat(1.voteactstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_v "\textbf{\textit{Unexpected outcome?}}" 2.voteactstatus_whole#1.unexpected_v "\textbf{\textit{2-way interaction}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD" "FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.voteactstatus_whole "\hspace{1em} Loser (R)" 2.voteactstatus_whole "\hspace{1em} Non-voter" 3.voteactstatus_whole "\hspace{1em} Winner" 1.unexpected_v "\hspace{1em} Yes" 2.voteactstatus_whole#1.unexpected_v "\hspace{1em} Non-voter $\times$ Unexpected" 3.voteactstatus_whole#1.unexpected_v "\hspace{1em} Winner $\times$ Unexpected" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" ) order(1.voteactstatus_whole 2.voteactstatus_whole 3.voteactstatus_whole 1.unexpected_v 2.voteactstatus_whole#1.unexpected_v 3.voteactstatus_whole#1.unexpected_v economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2000 U.S. Presidential Election")

eststo clear

* Party identification, Political cynicism

eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p cynicism_post_n i.people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p cynicism_post_n i.people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2000_anes_integrity_cynicism_pid.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_p 1.pidstatus_whole#0.unexpected_p 2.pidstatus_whole#0.unexpected_p 3.pidstatus_whole#0.unexpected_p 1.pidstatus_whole#1.unexpected_p 0.people) refcat(1.pidstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_p "\textbf{\textit{Unexpected outcome?}}" 2.pidstatus_whole#1.unexpected_p "\textbf{\textit{2-way interaction}}"  cynicism_post_n "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("Without" "With" "Without" "With") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.pidstatus_whole "\hspace{1em} Loser (R)" 2.pidstatus_whole "\hspace{1em} Independent" 3.pidstatus_whole "\hspace{1em} Winner" 1.unexpected_p "\hspace{1em} Yes" 2.pidstatus_whole#1.unexpected_p "\hspace{1em} Independent $\times$ Unexpected" 3.pidstatus_whole#1.unexpected_p "\hspace{1em} Winner $\times$ Unexpected" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" cynicism_post_n "\hspace{1em} Political cynicism" 1.people "\hspace{1em} Social mistrust") order(1.pidstatus_whole 2.pidstatus_whole 3.pidstatus_whole 1.unexpected_p 2.pidstatus_whole#1.unexpected_p 3.pidstatus_whole#1.unexpected_p cynicism_post_n 1.people economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2000 U.S. Presidential Election")

eststo clear

* Reported vote, Political cynicism

eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v cynicism_post_n i.people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v cynicism_post_n i.people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2000_anes_integrity_cynicism_vote.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_v 1.voteactstatus_whole#0.unexpected_v 2.voteactstatus_whole#0.unexpected_v 3.voteactstatus_whole#0.unexpected_v 1.voteactstatus_whole#1.unexpected_v 0.people) refcat(1.voteactstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_v "\textbf{\textit{Unexpected outcome?}}" 2.voteactstatus_whole#1.unexpected_v "\textbf{\textit{2-way interaction}}" cynicism_post_n "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("Without" "With" "Without" "With") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.voteactstatus_whole "\hspace{1em} Loser (R)" 2.voteactstatus_whole "\hspace{1em} Non-voter" 3.voteactstatus_whole "\hspace{1em} Winner" 1.unexpected_v "\hspace{1em} Yes" 2.voteactstatus_whole#1.unexpected_v "\hspace{1em} Non-voter $\times$ Unexpected" 3.voteactstatus_whole#1.unexpected_v "\hspace{1em} Winner $\times$ Unexpected" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" cynicism_post_n "\hspace{1em} Political cynicism" 1.people "\hspace{1em} Social mistrust") order(1.voteactstatus_whole 2.voteactstatus_whole 3.voteactstatus_whole 1.unexpected_v 2.voteactstatus_whole#1.unexpected_v 3.voteactstatus_whole#1.unexpected_v cynicism_post_n 1.people economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2000 U.S. Presidential Election")

eststo clear

log close